package com.bifang.core.dao.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 系统方法表
 *
 * @author chenzh
 * @since 2020-10-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("SYS_FUNCTION")
@ApiModel(value = "SysFunction对象", description = "系统方法表")
public class OplogFunction extends Model<OplogFunction> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "方法id")
    @TableId(value = "FUNC_ID", type = IdType.INPUT)
    private String funcId;

    @ApiModelProperty(value = "功能编号")
    @TableField("FUNC_CODE")
    private String funcCode;

    @ApiModelProperty(value = "功能类型")
    @TableField("FUNC_TYPE")
    private String funcType;

    @ApiModelProperty(value = "功能类型名称")
    @TableField("FUNC_NAME")
    private String funcName;

    @ApiModelProperty(value = "功能备注 摘要信息 使用arrayjson")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "功能标题")
    @TableField("FUNC_TITLE")
    private String funcTitle;

    @ApiModelProperty(value = "api")
    @TableField("API")
    private String api;

    @ApiModelProperty(value = "有效标志 0禁用 1启用")
    @TableField("`STATUS`")
    private String status;

    @ApiModelProperty(value = "父功能id")
    @TableField("PARENT_ID")
    private String parentId;

    @ApiModelProperty(value = "同级序号")
    @TableField("ORDER_NO")
    private Integer orderNo;

    @ApiModelProperty(value = "级别")
    @TableField("RATE")
    private Integer rate;

    @ApiModelProperty(value = "节点类型 0 节点 1 叶子")
    @TableField("NODE_TYPE")
    private String nodeType;

    @ApiModelProperty(value = "是否公共方法 0 否 1 是")
    @TableField("PUBLIC_FLAG")
    private String publicFlag;

    @ApiModelProperty(value = "类路径")
    @TableField("CLASS_PATH")
    private String classPath;

    @ApiModelProperty(value = "请求方法")
    @TableField("METHOD")
    private String method;

    @ApiModelProperty(value = "创建人")
    @TableField(
            value = "CREATE_NAME",
            fill = FieldFill.INSERT,
            updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @ApiModelProperty(value = "创建时间")
    @TableField(
            value = "CREATE_TIME",
            fill = FieldFill.INSERT,
            updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @ApiModelProperty(value = "修改人")
    @TableField(
            value = "UPDATE_NAME",
            fill = FieldFill.INSERT_UPDATE,
            updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @ApiModelProperty(value = "更新时间")
    @TableField(
            value = "UPDATE_TIME",
            fill = FieldFill.INSERT_UPDATE,
            updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @ApiModelProperty(value = "逻辑删除标志 0 正常 1 删除")
    @TableField(value = "DEL", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String del;

    @ApiModelProperty(value = "操纵期控制规则")
    @TableField("OPERATING")
    private String operating;

    @ApiModelProperty(value = "是否记录日志 0 否 1 是")
    @TableField("LOG_FLAG")
    private String logFlag;

    @ApiModelProperty(value = "是否 允许回退 0 否 1 是")
    @TableField("ROLLBACK_FLAG")
    private String rollbackFlag;

    @ApiModelProperty(value = "是否需要审核 0 不需要 1需要")
    @TableField("AUDIT_FLAG")
    private String auditFlag;

    @ApiModelProperty(value = "是否允许跨业务期回退：1 允许 0 不允许")
    @TableField("SPAN_ROLLBACK_FLAG")
    private String spanRollbackFlag;

    @ApiModelProperty(value = "工作流中审核类型 start 开始启动节点  audit 审核中节点 end 审核结束节点 other 其他")
    @TableField("AU_TYPE")
    private String auType;

    @ApiModelProperty(value = "忽略回退跨业务的业务类型")
    @TableField("IGNORE_RB_OP")
    private String ignoreRbOp;

    @ApiModelProperty(value = "同一数据类型业务不允许一起待办的业务类型")
    @TableField("NOT_DOING_OP")
    private String notDoingOp;

    @ApiModelProperty(value = "下一级调用功能编号")
    @TableField("NEXT_FUNC_CODE")
    private String nextFuncCode;

    @Override
    public Serializable pkVal() {
        return this.funcId;
    }
}
